<template>
	<view class="unboundDevice-page">
		<view class="tips">暂未绑定孩子设备，请先下载绑定孩子端</view>
		<view class="to-bund" @click="jumpPage">
			<van-button color="#FFD44B" round size="small" class="bindChild"><view class="down-txt">{{ btnTxt }}</view></van-button>
		</view>
	</view>
</template>

<script lang="ts" setup>
	import { computed } from 'vue'
	import { useBound } from "@/hooks/useBound.ts"
	import { mock } from "@/utils/index"
	const { tipBoundStudent } = useBound()
	
	const btnTxt = computed(() => mock.isLogged() ? '下载孩子端' : '体验账号')
	const jumpPage = () =>{
		if(!mock.isLogged()){
			tipBoundStudent()
			return
		}
		uni.navigateTo({
			url:"/pagesA/addChildDevices/index"
		})
	}
</script>

<style lang="scss" scoped>
	.unboundDevice-page{
		width: calc(100% - 40upx);
		// height: 105upx;
		margin: 0 auto;
		// background: linear-gradient( 90deg, #273F36 0%, #28432A 100%);
		// background:rgba(0,0,0,.15);
		background: rgba(26,156,103,0.4);
		border-radius: 12px 12px 12px 12px;
		border: 1px solid rgba(24,171,111,0.5);
		display: flex;
		justify-content: center;
		flex-direction: column;
		align-items: center;
		padding: 22upx 0 13upx 0;
		.tips{
			// width: 196px;
			// height: 20px;
			font-family: PingFang SC, PingFang SC;
			// font-weight: 800;
			font-size: 28upx;
			color: #FFFFFF;
			line-height: 28upx;
			text-align: center;
			font-style: normal;
			text-transform: none;
			margin-bottom: 14upx;
		}
		.to-bund{
			margin: 20upx 0;
			.van-button {
				// width: 118upx;
				height: 36upx ;
				color: #000;
				padding: 0 40upx;
			}
		}
	}
</style>

<style lang="scss">
	.bindChild{
		button{
			// padding: 32upx 80upx;
			    // color: #fff;
			    // background: #FFD44B;
			    // border-color: #FFD44B;
			    padding: 40upx 130upx;
		}
		.down-txt{
			font-size: 30upx;
			color: #000;
			font-weight: bold;
		}
		
	}
</style>